﻿
//以字符串文本建立xml，返回xml对象
loadXML = function(xmlString) {
    var xmlDoc;
    if (window.ActiveXObject) {
        xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
        xmlDoc.async = false;
        xmlDoc.loadXML(xmlString);
    }
    else if (document.implementation && document.implementation.createDocument) {
        xmlDoc = document.implementation.createDocument('', '', null);
        xmlDoc.loadXML(xmlString);
    }
    else {
        return null;
    }
    return xmlDoc;
}